package com.zp.master.modules.dao;


import com.zp.master.common.persistence.CrudDao;
import com.zp.master.modules.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

@Mapper
public interface SysRoleDao extends CrudDao<SysRole> {

    /**
     * 查询角色内容
     *
     * @param name
     * @return
     */
    public Set<String> getDescription(@Param("name") String name);

    /**
     * 获取用户的角色
     * @param userId
     * @return
     */
    List<SysRole> listRolesByUserId(@Param("userId")Long userId);
}
